#include <iostream>
#include "memory_pool/MemoryPoolManager.h"

using namespace  std;

class Node {
public:
    Node () {
	val = 10;
	
	arr[0] = 10;
	arr[1]  = 1;
	arr[2] = 3;
	
    }
    int val = 1;
    int arr[10]{};
};

int main()
{
    auto pool = MemoryManager::GetInstance()->GetMemoryPool<Node>();
    auto nodePtr = pool->CreateObjectSPtrWithDeleter([](Node* node){
	std::cout << "deleteFunc , node : " << node << std::endl;
    });
    auto pool2 = MemoryManager::GetInstance()->GetMemoryPool<Node>();
    auto n = pool2->CreateObject();
    n->val = 1;
    cout << n->val << endl;
    
    MemoryManager::GetInstance()->Clear();
    return 0;
}